package com.wgly.question.bean;

import java.util.ArrayList;
import java.util.List;

public class OptionsExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public OptionsExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andOptionsidIsNull() {
            addCriterion("optionsId is null");
            return (Criteria) this;
        }

        public Criteria andOptionsidIsNotNull() {
            addCriterion("optionsId is not null");
            return (Criteria) this;
        }

        public Criteria andOptionsidEqualTo(Integer value) {
            addCriterion("optionsId =", value, "optionsid");
            return (Criteria) this;
        }

        public Criteria andOptionsidNotEqualTo(Integer value) {
            addCriterion("optionsId <>", value, "optionsid");
            return (Criteria) this;
        }

        public Criteria andOptionsidGreaterThan(Integer value) {
            addCriterion("optionsId >", value, "optionsid");
            return (Criteria) this;
        }

        public Criteria andOptionsidGreaterThanOrEqualTo(Integer value) {
            addCriterion("optionsId >=", value, "optionsid");
            return (Criteria) this;
        }

        public Criteria andOptionsidLessThan(Integer value) {
            addCriterion("optionsId <", value, "optionsid");
            return (Criteria) this;
        }

        public Criteria andOptionsidLessThanOrEqualTo(Integer value) {
            addCriterion("optionsId <=", value, "optionsid");
            return (Criteria) this;
        }

        public Criteria andOptionsidIn(List<Integer> values) {
            addCriterion("optionsId in", values, "optionsid");
            return (Criteria) this;
        }

        public Criteria andOptionsidNotIn(List<Integer> values) {
            addCriterion("optionsId not in", values, "optionsid");
            return (Criteria) this;
        }

        public Criteria andOptionsidBetween(Integer value1, Integer value2) {
            addCriterion("optionsId between", value1, value2, "optionsid");
            return (Criteria) this;
        }

        public Criteria andOptionsidNotBetween(Integer value1, Integer value2) {
            addCriterion("optionsId not between", value1, value2, "optionsid");
            return (Criteria) this;
        }

        public Criteria andTidIsNull() {
            addCriterion("tId is null");
            return (Criteria) this;
        }

        public Criteria andTidIsNotNull() {
            addCriterion("tId is not null");
            return (Criteria) this;
        }

        public Criteria andTidEqualTo(Integer value) {
            addCriterion("tId =", value, "tid");
            return (Criteria) this;
        }

        public Criteria andTidNotEqualTo(Integer value) {
            addCriterion("tId <>", value, "tid");
            return (Criteria) this;
        }

        public Criteria andTidGreaterThan(Integer value) {
            addCriterion("tId >", value, "tid");
            return (Criteria) this;
        }

        public Criteria andTidGreaterThanOrEqualTo(Integer value) {
            addCriterion("tId >=", value, "tid");
            return (Criteria) this;
        }

        public Criteria andTidLessThan(Integer value) {
            addCriterion("tId <", value, "tid");
            return (Criteria) this;
        }

        public Criteria andTidLessThanOrEqualTo(Integer value) {
            addCriterion("tId <=", value, "tid");
            return (Criteria) this;
        }

        public Criteria andTidIn(List<Integer> values) {
            addCriterion("tId in", values, "tid");
            return (Criteria) this;
        }

        public Criteria andTidNotIn(List<Integer> values) {
            addCriterion("tId not in", values, "tid");
            return (Criteria) this;
        }

        public Criteria andTidBetween(Integer value1, Integer value2) {
            addCriterion("tId between", value1, value2, "tid");
            return (Criteria) this;
        }

        public Criteria andTidNotBetween(Integer value1, Integer value2) {
            addCriterion("tId not between", value1, value2, "tid");
            return (Criteria) this;
        }

        public Criteria andLabelIsNull() {
            addCriterion("label is null");
            return (Criteria) this;
        }

        public Criteria andLabelIsNotNull() {
            addCriterion("label is not null");
            return (Criteria) this;
        }

        public Criteria andLabelEqualTo(String value) {
            addCriterion("label =", value, "label");
            return (Criteria) this;
        }

        public Criteria andLabelNotEqualTo(String value) {
            addCriterion("label <>", value, "label");
            return (Criteria) this;
        }

        public Criteria andLabelGreaterThan(String value) {
            addCriterion("label >", value, "label");
            return (Criteria) this;
        }

        public Criteria andLabelGreaterThanOrEqualTo(String value) {
            addCriterion("label >=", value, "label");
            return (Criteria) this;
        }

        public Criteria andLabelLessThan(String value) {
            addCriterion("label <", value, "label");
            return (Criteria) this;
        }

        public Criteria andLabelLessThanOrEqualTo(String value) {
            addCriterion("label <=", value, "label");
            return (Criteria) this;
        }

        public Criteria andLabelLike(String value) {
            addCriterion("label like", value, "label");
            return (Criteria) this;
        }

        public Criteria andLabelNotLike(String value) {
            addCriterion("label not like", value, "label");
            return (Criteria) this;
        }

        public Criteria andLabelIn(List<String> values) {
            addCriterion("label in", values, "label");
            return (Criteria) this;
        }

        public Criteria andLabelNotIn(List<String> values) {
            addCriterion("label not in", values, "label");
            return (Criteria) this;
        }

        public Criteria andLabelBetween(String value1, String value2) {
            addCriterion("label between", value1, value2, "label");
            return (Criteria) this;
        }

        public Criteria andLabelNotBetween(String value1, String value2) {
            addCriterion("label not between", value1, value2, "label");
            return (Criteria) this;
        }

        public Criteria andlableIndexIsNull() {
            addCriterion("leable_index is null");
            return (Criteria) this;
        }

        public Criteria andlableIndexIsNotNull() {
            addCriterion("leable_index is not null");
            return (Criteria) this;
        }

        public Criteria andlableIndexEqualTo(String value) {
            addCriterion("leable_index =", value, "lableIndex");
            return (Criteria) this;
        }

        public Criteria andlableIndexNotEqualTo(String value) {
            addCriterion("leable_index <>", value, "lableIndex");
            return (Criteria) this;
        }

        public Criteria andlableIndexGreaterThan(String value) {
            addCriterion("leable_index >", value, "lableIndex");
            return (Criteria) this;
        }

        public Criteria andlableIndexGreaterThanOrEqualTo(String value) {
            addCriterion("leable_index >=", value, "lableIndex");
            return (Criteria) this;
        }

        public Criteria andlableIndexLessThan(String value) {
            addCriterion("leable_index <", value, "lableIndex");
            return (Criteria) this;
        }

        public Criteria andlableIndexLessThanOrEqualTo(String value) {
            addCriterion("leable_index <=", value, "lableIndex");
            return (Criteria) this;
        }

        public Criteria andlableIndexLike(String value) {
            addCriterion("leable_index like", value, "lableIndex");
            return (Criteria) this;
        }

        public Criteria andlableIndexNotLike(String value) {
            addCriterion("leable_index not like", value, "lableIndex");
            return (Criteria) this;
        }

        public Criteria andlableIndexIn(List<String> values) {
            addCriterion("leable_index in", values, "lableIndex");
            return (Criteria) this;
        }

        public Criteria andlableIndexNotIn(List<String> values) {
            addCriterion("leable_index not in", values, "lableIndex");
            return (Criteria) this;
        }

        public Criteria andlableIndexBetween(String value1, String value2) {
            addCriterion("leable_index between", value1, value2, "lableIndex");
            return (Criteria) this;
        }

        public Criteria andlableIndexNotBetween(String value1, String value2) {
            addCriterion("leable_index not between", value1, value2, "lableIndex");
            return (Criteria) this;
        }

        public Criteria andIsAnswerIsNull() {
            addCriterion("isAnswer is null");
            return (Criteria) this;
        }

        public Criteria andIsAnswerIsNotNull() {
            addCriterion("isAnswer is not null");
            return (Criteria) this;
        }

        public Criteria andIsAnswerEqualTo(String value) {
            addCriterion("isAnswer =", value, "isAnswer");
            return (Criteria) this;
        }

        public Criteria andIsAnswerNotEqualTo(String value) {
            addCriterion("isAnswer <>", value, "isAnswer");
            return (Criteria) this;
        }

        public Criteria andIsAnswerGreaterThan(String value) {
            addCriterion("isAnswer >", value, "isAnswer");
            return (Criteria) this;
        }

        public Criteria andIsAnswerGreaterThanOrEqualTo(String value) {
            addCriterion("isAnswer >=", value, "isAnswer");
            return (Criteria) this;
        }

        public Criteria andIsAnswerLessThan(String value) {
            addCriterion("isAnswer <", value, "isAnswer");
            return (Criteria) this;
        }

        public Criteria andIsAnswerLessThanOrEqualTo(String value) {
            addCriterion("isAnswer <=", value, "isAnswer");
            return (Criteria) this;
        }

        public Criteria andIsAnswerLike(String value) {
            addCriterion("isAnswer like", value, "isAnswer");
            return (Criteria) this;
        }

        public Criteria andIsAnswerNotLike(String value) {
            addCriterion("isAnswer not like", value, "isAnswer");
            return (Criteria) this;
        }

        public Criteria andIsAnswerIn(List<String> values) {
            addCriterion("isAnswer in", values, "isAnswer");
            return (Criteria) this;
        }

        public Criteria andIsAnswerNotIn(List<String> values) {
            addCriterion("isAnswer not in", values, "isAnswer");
            return (Criteria) this;
        }

        public Criteria andIsAnswerBetween(String value1, String value2) {
            addCriterion("isAnswer between", value1, value2, "isAnswer");
            return (Criteria) this;
        }

        public Criteria andIsAnswerNotBetween(String value1, String value2) {
            addCriterion("isAnswer not between", value1, value2, "isAnswer");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}